<!-- 主页分类组件 -->
<template>
	<view id="body">
		<view>
		    <u-grid :border="false" @click="click" col="3">
		        <u-grid-item v-for="(baseListItem,baseListIndex) in baseList":key="baseListIndex">
		            <text :class="baseListItem.title":customStyle="{paddingTop:20+'rpx'}" style="margin-top: 20rpx; width: 64rpx; height: 64rpx;"></text>
		            <text class="grid-text" style="color:#000000;">{{baseListItem.name}}</text>
		        </u-grid-item>
		    </u-grid>
		    <u-toast ref="uToast" />
		</view>
	</view>
</template> 

<script>
	export default {
		name:"indexclassify",
		data() {
			return {
				baseList: [
					{
						name: '跑腿服务',
				        title: 't-icon t-icon-shequ',
				    },
				    {
				        name: '失物招领',
				        title: 't-icon t-icon-shiwuzhaoling'
				    },  
					// {
					// 	name: '交友盲盒',
					// 	title:'t-icon t-icon-haoyou'
					// },
					{
					    name: '二手交易',
					    title: 't-icon t-icon-xinniantubiaomoban-15'
					},
					// {
					// 	name:'学习中心',
					// 	title:'t-icon t-icon-xuexizhongxin'
					// },
					// {
					// 	name:'助农服务',
					// 	title:'t-icon t-icon-nongmin'
					// },
					// {
					// 	name:'校园论坛',
					// 	title:'t-icon t-icon-luntanzixun'
					// },
					//,
					// {
					// 	name:'元校园',
					// 	title:'t-icon t-icon-xiaoyuanquanzi'
					// }
				],
		}
	},
	methods:{
		click(name) {
			var urlList = [
				"/loafer/loaferIndex",
				"/shiwuzhaoling/swzlindex",
				 // "/makefriends/index",
				"/tzmarket/tzmarketindex",
				"/study/index",
				"/nongsuke/index",
				"/forum/index",
				// "/multielement/index"
			]
			uni.navigateTo({ 
				url:urlList[name]
			})
			console.log("点击的是："+name,urlList[name]) 
		}, 
	}
}
</script>
	
<style scoped>
	@import url("../static/css/componentsCss/index/indexClassify.css");
</style>